﻿/*
 * Created by SharpDevelop.
 * User: IEscarro
 * Date: 8/25/2009
 * Time: 4:56 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Miming.Model;

namespace Miming.Gui.Items
{
	/// <summary>
	/// Description of ServiceItemPane.
	/// </summary>
	public partial class ServiceItemPane : BaseUserControl, IObserver
	{
		public ServiceItemPane()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
		}
		
		protected override void OnModelChanged(EventArgs e)
		{
			base.OnModelChanged(e);
			Item i = Model as Item;
			textBoxName.Text = i.Name;
		}
		
		public void Update(Observable o)
		{
			Model = o;
		}
	}
	
	public class ServiceItemType : ItemType
	{
		public ServiceItemType() : base("Service", new ServiceItemPane(), "Use for services you charge for or purchase, like specialized labor, consulting hours, or professional fees.")
		{
		}
	}
}
